﻿@using CMSMVC4.Filters
@using CMSMVC4.MultiResource
@model CMSMVC4.PageLang
@{Html.RenderAction("GetBanertop", "Menu", new { type = BanerType.TinTuc });}
<div id="main_mid">
    <div id="dichvu_mid_left">
        @{Html.RenderAction("ListTinTuc", "TinTuc");}
       @* @{Html.RenderAction("ListNewsHot","TinTuc");}
        @{Html.RenderAction("ListContact","LienHe");}*@
        @{Html.RenderAction("GetBanerleft", "Menu", new { type = BanerType.TinTuc });}
    </div>
    <div id="dichvu_mid_right">
        <div class="dichvu_mid_right_top">
            @if (Model != null)
            {
                @Html.Raw(Model.FullContent)   
            }
        </div>
        @if (ViewBag.IdPage!=null)
        {
            Html.RenderAction("ListComment", "Comment", new { id = ViewBag.IdPage });
            <div id="load_comment">
                <div class="commenttitle">
                    <div class="dinhvu_mid_right_textbinhluan">
                        @Resource.Comment</div>
                    <div class="commenterror">
                    </div>
                </div>
                <div class="dichvu_mid_right_binhluan">
                    @using (Ajax.BeginForm("SendComment", "Comment", new AjaxOptions() {HttpMethod = "Post", UpdateTargetId = "load_comment"}))
                    {
                        <input name="id" value="@ViewBag.IdPage" type="hidden" />
                        <input name="email" class="emailcomment" placeholder="@Resource.Comment_email" />
                        <textarea name="data" class="datacomment" placeholder="@Resource.Comment_data"></textarea>
                        <input  class="sendcomment" type="submit" value="@Resource.Comment_submit" />
                    }
                </div>
            </div>
        }
    </div>
</div>
<script language="javascript" type="text/javascript">
    $(function () {
        var id = @ViewBag.Id;
        var size = $('#dichvu_mid_left_warpermenu .dichvu_mid_left_menu').size();
        for (var i = 0; i < size; i++) {
            if ($('.dichvu_mid_left_menu').eq(i).attr('index') == id) {
                $('.dichvu_mid_left_menu').eq(i).css({'background-image': 'url(/Images/Css/img/hover_03.png)'});
            } else {
                $('.dichvu_mid_left_menu').eq(i).css({'background-image': 'url(/Images/Css/img/menu-small_06.png)'});
            
            }
        }
        $('.dichvu_mid_left_menu').hover(function() {
                if ($(this).attr('index') != id) {
                    $(this).css({'background-image': 'url(/Images/Css/img/hover_03.png)'});
                }  
            }, function() {
                if ($(this).attr('index') != id) {
                    $(this).css({'background-image': 'url(/Images/Css/img/menu-small_06.png)'});
                } 
            });
    });
</script>
